/**
 * StringsUtils
 * 
 * 05/12/2013
 * 
 * Copyright GPL
 */
package com.jtmproject.javiertejedor.classes;

/**
 * This class contains function to make actions with stings
 * This class has been designed with Singleton Pattern:
 * http://es.wikipedia.org/wiki/Singleton
 * 
 * @author Javier Tejedor
 */
public class StringsUtils {

	private static StringsUtils stringsUtils;
	
	/**
	 * this returns an static instance of the same class(Singleton Pattern)
	 * @return
	 */
	public static StringsUtils geStringUtils(){
		if(stringsUtils == null){
			stringsUtils = new StringsUtils();
		}
		
		return stringsUtils;
	}
	
	/**
	 * returns if the string is void
	 * @param stringToAnalyze
	 * @return
	 */
	public boolean isStringVoid(String stringToAnalyze){
		return stringToAnalyze == null ||
				stringToAnalyze.replace(" ", "").equals("");
	}
	
}

